/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.ddtroops.serviceinterfaces;

import cz.muni.fi.pa165.ddtroops.dto.SkillDTO;
import java.util.List;

/**
 *
 * @author Erik
 */
public interface SkillService
{
    /**
     * Creates new Skill
     * @param name
     * @param description
     * @param profession
     * @param minXP
     * @return
     */
    SkillDTO createNewSkill(String name, String description, String profession, Long minXP);

    /**
     * Method creates new Skill from Skill object.
     * @param skill instance of class Skill to be created
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    void create(SkillDTO skill);

    /**
     * Method update updates state of given Skill.
     * @param skill instance of class Skill to be updated
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    void update(SkillDTO skill);

    /**
     * Method delete deletes given Skill.
     * @param skill instance of class Skill to be removed
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    void delete(SkillDTO skill);

    /**
     * Method getById retrieves Skill with specified id
     * @param id id of Skill
     * @return instance of class Skill with specified id
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    SkillDTO getById(Long id);

    /**
     * Method getAll fetches all the Skills.
     * @return list of instances of class Skill
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    List<SkillDTO> getAll();
    /**
     * Method getByProfession fetches all the Skills with corresponding profession value.
     * @param profession
     * @return
     */
    List<SkillDTO> getByProfession(String profession);
    /**
     * Method getByXp fetches all the Skills with minXp field at most xp value.
     * @param xp
     * @return
     */
    List<SkillDTO> getByXp(Long xp);
    /**
     * Fetches all the Skills with given profession and at most given xp.
     * @param profession
     * @param xp
     * @return
     */
    List<SkillDTO> getByProfessionAndXp(String profession, Long xp);

}
